package demo.orm;

/**
 * @author : GuoFei
 * @date : 2019/1/22 11:18
 */
public class SqlServerTypeConvertor implements TypeConvertor {
    @Override
    public String databaseType2JavaType(String column) {
        switch (column.toLowerCase()) {
            case "varchar":
            case "nvarchar":
                return "String";
            case "datetime2":
                return "java.util.Date";
            case "int":
            case "smallint":
            case "int identity":
                return "Integer";
            default:
                return null;
        }
    }

    @Override
    public String javaType2DatabaseType(String column) {
        // 待定
        return null;
    }
}
